package com.happycat.utils;

import com.happycat.base.R;
import com.happycat.base.exception.RestApiException;

/**
 * @Author shenbin
 * @CreatedDate 2020-09-12
 * @Modified By:
 */
public class ObjectsUtil {
    public static <T> T requireNonNull(T obj, String message) {
        if (obj == null)
            throw new RestApiException(R.fail(message));
        return obj;
    }
}
